#include "CommonData.h"


QSqlDatabase globalDB = QSqlDatabase::addDatabase("QSQLITE");    //基础数据库
QString databaseName = "../test/testDB.db";

void initDatabase()
{
    globalDB.setDatabaseName(databaseName);
    if (!globalDB.open()) {
        qDebug() << "Open Database Error " << globalDB.lastError().text();
        return ;
    }
    else
        qDebug() << "Open Database Ok";
}

void closeDatabase()
{
    globalDB.close();
}
